import frappe

def get_loader_html():
    """渲染立方体加载动画模板"""
    try:
        # 确保模板路径正确
        template_path = "light_theme/includes/cube_loader.html"
        return frappe.render_template(template_path, {})
    except Exception as e:
        frappe.log_error(f"Failed to render loader template: {str(e)}")
        # 失败时返回空字符串，避免页面崩溃
        return ""